package edu.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import edu.entity.Role;
import edu.service.RoleService;

/**
 * roleAction类.
 *
 * @author weidong
 *
 */
@SuppressWarnings("serial")
@Controller("roleAction")
public class RoleAction extends BaseAction {
	@Autowired
	private RoleService roleService;
	
	public String addRole() {
		Role role = new Role();
		role.setCode("aaa");
		role.setName("bbb");
		try {
			this.roleService.insert(role);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

	public RoleService getRoleService() {
		return roleService;
	}

	public void setRoleService(RoleService roleService) {
		this.roleService = roleService;
	}
	
	
}
